package com.songhq.desktop.view;


import com.songhq.desktop.utils.Config;
import de.felixroske.jfxsupport.AbstractFxmlView;
import de.felixroske.jfxsupport.FXMLView;
import de.felixroske.jfxsupport.GUIState;
import javafx.scene.Parent;
import org.apache.commons.lang.reflect.FieldUtils;
import org.springframework.context.annotation.Scope;

import java.util.Optional;
import java.util.ResourceBundle;

@Scope("prototype")
@FXMLView(value = "/fxmlView/Index.fxml", bundle = "locale.Menu")
public class IndexView  extends AbstractFxmlView {

    public IndexView() throws Exception {
        //反射修改默认语言
        //ResourceBundle bundle = ResourceBundle.getBundle(this.getResourceBundle().get().getBaseBundleName(), Config.defaultLocale);
//        FieldUtils.writeField(this,"bundle", Optional.ofNullable(bundle),true);
//        GUIState.getStage().setTitle(bundle.getString("Title"));//修改标题国际化
    }
//    @Override
//    public Parent getView() {
//
//
//    }


}
